/*
 * gui全局
 */

#include "gui.h"

static Font global_font_big;
static Font global_font_small;
static Image global_box_bg;

int gui_init()
{
	global_font_big = ttf_load("resources/FreeSansBold.ttf", 24);
	global_font_small = ttf_load("resources/FreeSansBold.ttf", 18);
	
	if (global_font_big == NULL || global_font_small == NULL)
		return -1;
	
	if ((global_box_bg = video_loadimg_x("resources/msgbox_bg.png", 128)) == NULL) {
		fprintf(stderr, "failed to open msgbox image.\n");
		return -1;
	}
	
	return 0;
}

Font gui_get_font_big()
{
	return global_font_big;
}

Font gui_get_font_small()
{
	return global_font_small;
}

Image gui_get_box_bg()
{
	return global_box_bg;
}

